package com.huan.dubbo.service.spi;

import com.huan.dubbo.service.OrderPay;
import org.apache.dubbo.common.URL;


public class PayOrderWrapper2 implements OrderPay {
    private OrderPay orderPay;

    public PayOrderWrapper2(OrderPay orderPay) {
        this.orderPay = orderPay;
    }

    @Override
    public String pay() {
        System.out.println("before Wrapper2");
        String pay = orderPay.pay();
        System.out.println("after Wrapper2");
        return pay;
    }

    @Override
    public String payAdaptive(URL url) {
        System.out.println("before Wrapper2");
        String pay = orderPay.payAdaptive(url);
        System.out.println("after Wrapper2");
        return pay;

    }
}
